package com.atguigu.day09.test.ts05.ts01;

/*
this: 代指当前对象
  作用:
     调用属性
     调用方法
     调用本类中的构造器

 */
public class Person {
    String name;
    int age;
    double salary;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name, int age, double salary) {
        this(name, age);
       /* this.name = name;
        this.age = age;*/
        this.salary = salary;

    }

    public void showName() {
        System.out.println(this.name);
        this.showAge();
    }

    public void showAge() {
        System.out.println("age = " + this.age);
    }
}
